package com.example.zyl.common.query.enums;

import com.example.zyl.common.utils.EncryptUtils;
import com.example.zyl.common.utils.function.CryptHandle;
import lombok.AllArgsConstructor;

/**
 * 解密算法枚举
 */
@AllArgsConstructor
public enum DecryptAlg {

    BASE64(EncryptUtils::decryptByBase64),

    AES(EncryptUtils::decryptByAes),

    SM4(EncryptUtils::decryptBySm4),

    RSA(EncryptUtils::decryptByRsa);

    //可自行添加其他脱敏策略
    private final CryptHandle<String, String> desensitizer;

    public CryptHandle<String, String> desensitizer() {
        return desensitizer;
    }
}
